#pragma once
#include <functional>
#include <iostream>
#include "Log.hpp"

using task_t = std::function<void()>;
using namespace LogModule;

void Download()
{
    LOG(LogLevel::INFO) << "正在执行一个下载任务...";
}

class Task
{
public:
    Task(){}
    Task(int x, int y) :_x(x), _y(y)
    {}

    int X()
    {
        return _x;
    }

    int Y()
    {
        return _y;
    }

    void Excute()
    {
        _result = _x + _y;
    }

    int Result()
    {
        return _result;
    }

    ~Task()
    {}
private:
    int _x;
    int _y;
    int _result;
};